import React from 'react'
import { NavBar, Space, Toast } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'

function MyNavBar(props) {
    let navigate=useNavigate()
    let {title,url}=props
  return (
    <div style={{background:'rgb(75, 174, 198)'}}>
      <NavBar onBack={()=>navigate(url||-1)} >{title}</NavBar>
    </div>
  )
}

export default MyNavBar
